Namespace - LJCWinFormCommon
Parameters
filter - The file filter.
initialDirectory - The initial selected directory.
defaultFileSpec - The default file specification.
Returns
The file specification. A null string if the "Cancel" button is selected.
Syntax
C# |
public static String SaveFile(String filter, String initialDirectory = null, String defaultFileSpec = null)
|
Displays the Save dialog to select a file.
Example
C# |
var filter = "csv files(*.csv)|*.csv|txt files(*.txt)|*.txt|All files(*.*)|*.*";
var initialDirectory = Directory.GetCurrentDirectory();
var inputFileSpec = FormCommon.SaveFile(filter, initialDirectory);
if (inputFileSpec != null)
{
}
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.